<template>
	<view class="list-cont">
		<view v-for="(item, index) in props.renderList" @click="goMangaDetail(item)" :key="index" class="list-item-cont flex-row shadow-one">
			<!-- 通过 传入 showRankTag 控制tag （排行榜在用） -->
			<u-tag v-if="props.showRankTag" :text="index" plain size="mini" type="warning"></u-tag>
			<u--image :src="item.src" width="90px" height="120px"></u--image>
			<view class="info-cont">{{ item.title }}</view>
		</view>
	</view>
</template>

<script setup>
import { ref, reactive, onMounted } from 'vue';
import {goMangaDetail} from '../utils/routerNavigator.js'

let props = defineProps({
	renderList:{
		type:Array,
		default:()=>[]
	},
	showRankTag:{
		type:Boolean,
		default:false
	}
})
</script>

<style lang="scss">
.list-item-cont {
	padding: 10px;
	margin: 10px;
	.u-tag {
		margin-right: 5px;
	}
	.info-cont {
		margin: 10px;
	}
}
</style>
